package com.swz.dcrm.adpter;

import android.content.Context;

import com.swz.dcrm.R;
import com.swz.dcrm.base.ViewHolder;
import com.swz.dcrm.db.TbCarModel;


import java.util.List;

public class LatelySearchCarModelAdapter extends CustomAdapter<TbCarModel> {
    public LatelySearchCarModelAdapter(Context context, List<TbCarModel> datas) {
        super(context, R.layout.item_lately_search, datas);
    }

    @Override
    protected void convert(ViewHolder holder, TbCarModel tbCarModel, int position) {
        holder.setText(R.id.tv_car_model,tbCarModel.getCarSeriesDesc()+" "+tbCarModel.getCarModelDesc());
        holder.itemView.setOnClickListener(v -> {
            if(onClickListener!=null){
                onClickListener.onItemClick(tbCarModel);
            }
        });
    }
}
